package edu.gznu.ics.fast.pulsar.model.po.user;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Y on 2016/7/26.
 */
public class TdUserPO {
    private long userId;
    private String userName;
    private String userPasswd;


    public List<Long> getRoleIds() {
        List<Long> roleIdss = null;
        for (String r : roleIds.split(",")) {
            roleIdss = new ArrayList<Long>();

            roleIdss.add(Long.parseLong(r));
        }


        return roleIdss;
    }

    public void setRoleIds(String roleIds) {
        this.roleIds = roleIds;
    }

    private String roleIds; //拥有的角色列表;

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }


    public String getUserPasswd() {
        return userPasswd;
    }

    public void setUserPasswd(String userPasswd) {
        this.userPasswd = userPasswd;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    private String salt;

    public String getCredentialsSalt() {
        return userName + salt;
    }


}
